package bmatch.tech;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class HelloServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        String name = req.getParameter("name");
        resp.setContentType("text/html");

        resp.setStatus(200);
        resp.getWriter().print("<h1>Hello! " + name + "<h2>");


    }

    @Override
    public void destroy() {
        super.destroy();
    }
}
